package com.dragon.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 账单表
 * </p>
 *
 * @author sy
 * @since 2023-12-12
 */
@Getter
@Setter
@TableName("dragon_bill")
public class Bill implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 客户id
     */
    private Integer customerId;

    /**
     * 本期实收金额
     */
    private Double paymentMoney;

    /**
     * 本期应收金额
     */
    private Double planMoney;

    /**
     * 结余金额
     */
    private Double balanceMoney;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

    /**
     * 完成状态 0未完成 1已完成
     */
    private Integer isFinish;

    /**
     * 账单子表
     */
    @TableField(exist = false)
    private List<BillPlan> billPlans;

    /**
     * 客户名称
     */
    @TableField(exist = false)
    private String customerName;

    /**
     * 累计应收金额
     */
    @TableField(exist = false)
    private Double accruedPlanMoney;

    /**
     * 累计实收金额
     */
    @TableField(exist = false)
    private Double accruedPaymentMoney;

    /**
     * 客户创建人id
     */
    @TableField(exist = false)
    private Integer customerAdminId;

    /**
     * 客户创建人的部门id
     */
    @TableField(exist = false)
    private Integer customerDepartmentId;

    /**
     * 应收列表
     */
    @TableField(exist = false)
    private List<PlanCollect> planCollects;

    /**
     * 报价产品信息
     */
    @TableField(exist = false)
    private List<QuotesProducts> quotesProductsList;


}
